<template>
	<div class="main">
		
		<div class="welcome1" style="">
			<div style="color: #1890ff;font-weight: bold;font-size: 26px;text-align: center;margin-bottom: 50px;margin-top: 20px;">
				{{manageInfo.semester.Name}}（{{manageInfo.semester.StartTime}} ~ {{manageInfo.semester.EndTime}}） 
			</div>
			<a-row :gutter="24">
				<a-col :span="8">
					<a-card>
						<a-statistic title="老师人数" :value="manageInfo.teacherCount" :value-style="{ color: '#409EFF' }" style="margin-right: 50px">
							<template #prefix>
								<a-icon type="arrow-up" />
							</template>
						</a-statistic>
					</a-card>
				</a-col>
				<a-col :span="8">
					<a-card>
						<a-statistic title="在校学生人数" :value="manageInfo.studentCount" class="demo-class"
							:value-style="{ color: '#E6A23C' }">
							<template #prefix>
								<a-icon type="arrow-up" />
							</template>
						</a-statistic>
					</a-card>
				</a-col>
				<a-col :span="8">
					<a-card style="position: relative;">
						<a-statistic title="当前学期活动数" :value="manageInfo.activityCount" class="demo-class"
							:value-style="{ color: '#fff' }">
						</a-statistic>
						<div style="color: #67C23A;position: absolute;top: 49px;font: 15px;">
							进行中：<i style="font-size: 24px;font-style: normal;">{{manageInfo.activityCount}}</i> 　已完结：<i style="font-size: 24px;font-style: normal;">{{manageInfo.activityEndCount}}</i>
						</div>
					</a-card>
				</a-col>
				
			</a-row>

		</div>
	</div>
</template>

<script>
	// import AMap from 'AMap'
	import {
		getTokenToUser,
		GetTipsList,
		doGetMenu,
		ManageMainIndex
	} from '@/api/follow';
	import Cache from '@/utils/cache';
	export default {
		data() {
			return {
				requestUrl: this.global.requestUrl,
				detail: {},
				menuList: [],
				list: [],
				tableData: [],
				pagination: {
					currentPage: 1,
					pageSize: this.global.pageSize,
					pageSizeOptions: this.global.pageSizeOptions, //每页中显示的数据
					showTotal: total => `共有 ${total} 条数据` //分页中显示总的数据
				},
				manageInfo: {}
			};
		},
		computed: {},
		async created() {
			this.ManageMainIndex()
		},
		methods: {
			handleSizeChange(val) {
				this.pagination.pageSize = val;
			},
			handleCurrentChange(val) {
				this.pagination.currentPage = val;
			},
			menuListFun(data) {
				for (let i = 0; i < data.length; i++) {
					if (data[i].children.length > 0) {
						this.list = this.list.concat(data[i].children);
					}
				}
			},
			menu(s) {
				this.$router.push({
					name: s
				});
			},
			async ManageMainIndex() {
				let res = await ManageMainIndex();
				this.manageInfo = res.data;
			},
			async _getTokenToUser() {
				let res = await getTokenToUser();
				this.detail = res.data.data;
				Cache.set('info', res.data.data);
				// Cache.set('DealerID', res.data.data.DealerID)
				// Cache.set('DealerName', res.data.data.DealerName)
				Cache.set('Type', 3);
			}
		}
	};
</script>

<style lang="less" scoped>
	// /deep/#weather-view-he {
	// 	width: 90% !important;
	// 	margin: 0 5% !important;
	// }

	// .map {
	// 	width: 600px;
	// 	height: 600px;
	// }

	.main {
		margin: -14px;
		padding: 14px;
		min-height: calc(~'100% + 28px');
		// background: url(../assets/back-manage.png) no-repeat center;
		background-size: 100% 100%;
		object-fit: cover;

		.title {
			// background: url(../assets/title.png) no-repeat center;
			text-align: center;
			line-height: 40px;
			margin: 20px auto;
		}

		// .welcome {
		// 	text-align: center;
		// 	font-size: 34px;
		// 	color: #fff;
		// 	font-weight: 600;
		// 	background-image: -webkit-linear-gradient(bottom, #fff, #bfebfd);
		// 	-webkit-background-clip: text;
		// 	-webkit-text-fill-color: transparent;
		// 	line-height: 280px;
		// }
	}
</style>
